<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<meta http-equiv="content-language" content="de" />
		<meta http-equiv="content-type" content="text/html; charset=utf-8;" />
		<title>railadmin v{{$railadminversion}}</title>
		<script type="text/javascript">
			var djConfig = {
				isDebug:true,
				usePlainJson:true
			};
		</script>
		<script type="text/javascript" src="{{$resources_dir}}/dojo-release-1.0.2/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
		<script type="text/javascript" src="{{$resources_dir}}/ajaxBridge/ajaxBridge.js"></script>
		<script type="text/javascript" src="railusers.js"></script>
		<script type="text/javascript">
			// some dojo imports
			dojo.require("dojo.parser");
			dojo.require("dojo.data.ItemFileReadStore");
			dojo.require("dijit.Dialog");
			dojo.require("dijit.form.Button");
			dojo.require("dijit.form.CheckBox");
			dojo.require("dijit.form.FilteringSelect");
			dojo.require("dijit.form.NumberTextBox");
			dojo.require("dijit.form.TextBox");
			dojo.require("dijit.form.ValidationTextBox");
			dojo.require("dijit.layout.AccordionContainer");
			dojo.require("dijit.layout.ContentPane");
			dojo.require("dijit.layout.LayoutContainer");
			dojo.require("dijit.layout.TabContainer");
			dojo.require("dijit.Menu");
			dojo.require("dijit.Toolbar");

			dojo.addOnLoad( groups_refresh );
			dojo.addOnLoad( users_refresh );

		</script>
		<link rel="stylesheet" type="text/css" href="{{$resources_dir}}/dojo-release-1.0.2/dijit/themes/tundra/tundra.css" media="all" />
		<link rel="stylesheet" type="text/css" href="{{$resources_dir}}/dojo-release-1.0.2/dojo/resources/dojo.css" media="all" />
		<link rel="stylesheet" type="text/css" href="railusers.css" media="all" />
	</head>

	<body class="tundra">

		<div id="header">
			<a id="menu" title="Menü"><span class="htext">railbrowser</span></a>
			<span id="header_menu">
				<a id="add_user" href="javascript:dijit.byId('add_user').show();">Neuer Benutzer</a>
				<a id="add_group" href="javascript:dijit.byId('add_group').show();">Neue Gruppe</a>
			</span>
		</div>

		<div dojoType="dijit.layout.AccordionContainer" duration="200" id="left">
			<!-- ** users -->
            <div dojoType="dijit.layout.AccordionPane" selected="true" title="Benutzer">
				<div id="users"></div>
            </div>

			<!-- ** groups -->
            <div dojoType="dijit.layout.AccordionPane" selected="true" title="Gruppen">
				<div id="groups"></div>
            </div>
		</div>

        <!-- ** inventory -->
        <div id="inventory"> </div>

        <!-- Dialog: add group -->
		<div dojoType="dijit.Dialog" id="add_group" title="Neue Gruppe" refreshOnShow="true">
			<form id="add_group_form" name="add_group_form" method="POST">
				<label>
					<span class="flavel">Name</span>
					<input type="text" id="add_group_name" name="add_group_name"
		                dojoType="dijit.form.TextBox"
		                trim="true"
		                style="width: 185px;" />
				</label>
				<button dojoType=dijit.form.Button type="button" onclick="alert(1);">Hinzufügen</button>
			</form>
		</div>

        <!-- Dialog: add user -->
		<div dojoType="dijit.Dialog" id="add_user" title="Neuer Benutzer" refreshOnShow="true">
			<form id="add_user_form" name="add_user_form" method="POST">
				<label>
					<span class="flavel">Name</span>
					<input type="text" id="add_user_name" name="add_user_name"
		                dojoType="dijit.form.TextBox"
		                trim="true"
		                style="width: 185px;" />
				</label>
				<label>
					<span class="flavel">Passwort</span>
					<input type="text" id="add_user_passwd" name="add_user_passwd"
		                dojoType="dijit.form.TextBox"
		                trim="true"
		                style="width: 185px;" />
				</label>
				<button dojoType=dijit.form.Button type="button" onclick="user_add();">Hinzufügen</button>
			</form>
		</div>

	</body>
</html>